package com.liwei.appio;

import java.io.BufferedReader;
import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;

public class MyApp5 {
    public static void main(String[] args) {
        String temp="";
        String path="d:\\bb.txt";
        try {
            FileReader fileReader = new FileReader(path);
            BufferedReader bufferedReader = new BufferedReader(fileReader);
            String bb="";
            StringBuffer stringBuffer = new StringBuffer();
            while ((bb = bufferedReader.readLine())!=null){
                stringBuffer.append(bb);
                stringBuffer.append("\n");
            }
            temp=stringBuffer.toString();
            //关闭
            fileReader.close();
            bufferedReader.close();
        } catch (IOException e) {
            e.printStackTrace();
        }
        System.out.println(temp);
    }
}
